package com.dly.hope.modle;


import com.dly.hope.type.FileType;
import com.dly.hope.type.GroupType;
import io.swagger.models.auth.In;
import lombok.Data;
import org.hibernate.annotations.Comment;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;

/**
 * 群组用户
 */
@Entity
@Table(name = "hope012_group_user")
@DynamicUpdate
@DynamicInsert

@Data
public class GroupUser extends BaseEntity{

    @Id
    @Column(name = "id")
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "org.hibernate.id.UUIDGenerator")
    private String id;

    @Column(name = "group_id")
    @Comment(value = "群组")
    private String groupId;

    @Column(name = "member")
    @Comment(value = "成员")
    private String member;

    @Column(name = "is_agree")
    @Comment(value = "是否同意(由群主来通过)")
    private Integer isAgree = 0;

    @Column(name = "group_type")
    @Comment(value = "是申请 还是邀请")
    @Enumerated(EnumType.STRING)
    private GroupType groupType;
}
